import Login from "@/views/login";
import Main from "@/views/main";
const routes = [
    {
        path: "/login",
        component: Login
    },
    {
        path: "/",
        component: Main,
        children: [
            {
                path: "",
                redirect: "/dashboard"
            },
            {
                path: "/dashboard",
                component: () => import("@/views/main/pages/dashboard"),
                meta: {
                    path: "/dashboard"
                }
            },
            {
                path: "/users",
                component: () => import("@/views/main/pages/users"),
                meta: {
                    path: "/users"
                }
            },
            {
                path: "/users/:id/downloads",
                component: () => import("@/views/main/pages/users/downloads"),
                meta: {
                    path: "/users"
                }
            },
            {
                path: "/users/:id/ratings",
                component: () => import("@/views/main/pages/users/ratings"),
                meta: {
                    path: "/users"
                }
            },
            {
                path: "/banners",
                component: () => import("@/views/main/pages/banners"),
                meta: {
                    path: "/banners"
                }
            },
            {
                path: "/notices",
                component: () => import("@/views/main/pages/notices"),
                meta: {
                    path: "/notices"
                }
            },
            {
                path: "/notices/:id",
                component: () => import("@/views/main/pages/notices/detail"),
                meta: {
                    path: "/notices"
                }
            },
            {
                path: "/wallpapers",
                component: () => import("@/views/main/pages/wallpapers"),
                children: [
                    {
                        path: "categories",
                        component: () =>
                            import("@/views/main/pages/wallpapers/categories"),
                        meta: {
                            path: "/wallpapers/categories"
                        }
                    },
                    {
                        path: "categories/:id",
                        component: () =>
                            import(
                                "@/views/main/pages/wallpapers/categories/detail"
                            ),
                        meta: {
                            path: "/wallpapers/categories"
                        }
                    },
                    {
                        path: "galleries",
                        component: () =>
                            import("@/views/main/pages/wallpapers/galleries"),
                        meta: {
                            path: "/wallpapers/galleries"
                        }
                    },
                    {
                        path: "galleries/:id",
                        component: () =>
                            import(
                                "@/views/main/pages/wallpapers/galleries/detail"
                            ),
                        meta: {
                            path: "/wallpapers/galleries"
                        }
                    },
                    {
                        path: "collections",
                        component: () =>
                            import("@/views/main/pages/wallpapers/collections"),
                        meta: {
                            path: "/wallpapers/collections"
                        }
                    }
                ]
            }
        ]
    }
];

export default routes;
